//
//  SWBaseController.m
//  新浪微博 OC版
//
//  Created by wszyxc on 16/7/18.
//  Copyright © 2016年 wszyxc. All rights reserved.
//

#import "SWBaseController.h"

@interface SWBaseController ()


@end




@implementation SWBaseController



- (void)loadView{
    
    BOOL isLogin;
    
    isLogin = [WZHUserDefaults WZHBoolForKey:@"isLogin"];
    
    if (isLogin) {
        
        [super loadView];
        
    }else{
  
        UIView *visitorView = [[UIView alloc]initWithFrame:ScreenBounds];
        
        visitorView.backgroundColor = [UIColor orangeColor];
        
        self.view = visitorView;
        
        self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"注册" style:UIBarButtonItemStylePlain target:self action:@selector(registerClick)];

        self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"登陆" style:UIBarButtonItemStylePlain target:self action:@selector(loginClick)];
        
        [self.navigationController.navigationBar setTintColor:[UIColor orangeColor]];
    }
   
}

- (void)registerClick{
    
    NSLog(@"点击了注册");
}

- (void)loginClick{
    
    NSLog(@"点击了登陆");
}





@end
